package com.lyj.mode.combination;

/**
 * 组合模式的抽象构件
 * @author:liyajie
 * @createTime:2022/2/28 15:41
 * @version:1.0
 */
public abstract class Component {
    private String name;
    private String desc;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public Component(String name, String desc) {
        this.name = name;
        this.desc = desc;
    }

    public void add(Component component){
        throw new UnsupportedOperationException();
    }

    public void remove(Component component){
        throw new UnsupportedOperationException();
    }

    public abstract void show();
}
